import Vue from 'vue'
import Vuex from 'vuex'
import application from './modules/application.js'
import persistedstate from "vuex-persistedstate"
Vue.use(Vuex);

const store = new Vuex.Store({
    modules: {
        application
    },
    plugins:[persistedstate({
        storage:window.sessionStorage,
        reducer(val)  {
            return {
                // 只储存state中的token
                application: {agentUuid:val.application.agentUuid}
            }
        }
    })]
  })
  
  export default store